<?php
/*
	插件初始化
*/
if(!$_SESSION['uid']){
	exi('请先登录！','error','jy_yxgoodserpfw/workerlogin//loginup=1');
}
if($_SESSION['workerid']){
	$worker=pdo_get('jy_yxw_worker',array('juese'=>array(21,22),'id'=>$_SESSION['workerid'],'uniacid'=>$_SESSION['uniacid']));
}
if(!$worker['id']){
	$worker=pdo_get('jy_yxw_worker',array('juese'=>array(21,22),'mid'=>$_SESSION['uid'],'uniacid'=>$_SESSION['uniacid']));
}
if(!$worker['id']){
	$worker=pdo_get('jy_yxw_worker',array('mid'=>$_SESSION['uid'],'uniacid'=>$_SESSION['uniacid']));
}
$this->juese=$worker['juese'];
$this->workerid=$worker['id'];
$this->store_id=$worker['storeid'];
$_SESSION['forward_url']='jy_yxgoodserpfw/store.index/';
if(!$this->workerid){
	exi('你不是员工，无法登录','error','jy_yxgoodserpfw/workerlogin//loginup=1');
}